package com.info.zhiduoduo.common.validator;

import java.lang.annotation.Documented;
import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.validation.Constraint;
import javax.validation.Payload;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

/**
 * 判断是否是正确的手机号格式
 * @author bob
 * @time 2019/10/30 2:32 下午
 */
@Target({FIELD, PARAMETER})
@Retention(RUNTIME)
@Documented
@Constraint(validatedBy ={PhoneValidator.class})
public @interface Phone {

	String message() default "请输入正确的手机号";

	Class<?>[] groups() default {};

	Class<? extends Payload>[] payload() default {};
}
